<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>系统配置</title>
    <script src="../../../static/kaige/js/szload.js"></script>
    <style>
        .config-form .layui-form-item .layui-input-inline {
            width: 500px;
        }

        .hr-line-dashed {
            display: block;
            width: 100%;
            height: 0;
            border-bottom: 1px dashed #e6e6e6;
            margin: 15px auto;
            font-size: 0;
        }

        .uploadimgbtn {
            margin-top: 4px;
        }

        .layui-form .layui-form-item .labelnobb {
            border: 0;
            background-color: transparent;
        }

        .layui-form .layui-form-item .layui-form-label {
            width: 160px;
        }
    </style>
</head>

<body>
    <div class="kaige-body" id="sysconfig_form"></div>

    <script>
        load_init_js(function () {
            layui.config({
                base: szoapcpath + '/static/kaige/layuiextend/'
            }).use(['kaige'], function () {
                var form = layui.form, layer = layui.layer, $ = layui.jquery, element = layui.element, kaige = layui.kaige;

                kaige.form({
                    opentype: 'dom'  // 写dom 非弹窗 必填此项
                    , url: '/sys.config/index'
                    , box: 'sysconfig_form'
                    , id: 'kaige'
                    , encode: 1
                    , callbefore: function (res) {
                        //浏览器图标上传
                        kaige.upload_multi_files({
                            input_id: '#inputimgguid',
                            img_id: '#srcimgurl',
                            btn: '#editimg',
                            url: szoapcpath + '/pages/files/upfiles.html?id=7'
                        });

                        //图片预览
                        $('#srcimgurl').on('click', function (e) {
                            var url = $(this).attr('src');
                            kaige.viewimage({ maxwidth: 600, maxheight: 600, url: url });
                        });
                    }
                });
            });
        });
    </script>
    <script type="text/html" id="kaige_form_html">
        <div class="layui-tab layui-tab-card" style="margin-top: 0;" lay-filter="config-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">平台配置</li>
                <li>其它配置</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <!--平台设置-->
                    <form class="layui-form layui-form-pane config-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">App名称</label>
                            <div class="layui-input-inline">
                                <input name="app_name" required="required" placeholder="请输入程序名称" value="{{ d.app_name || '' }}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">App版本</label>
                            <div class="layui-input-inline">
                                <input name="app_version" required="required" placeholder="请输入程序版本" value="{{ d.app_version || '' }}" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">网站标题</label>
                            <div class="layui-input-inline">
                                <input name="site_title" required="required" placeholder="请输入网站名称" value="{{ d.site_title || '' }}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Copyright</label>
                            <div class="layui-input-inline">
                                <input name="site_copy" required="required" placeholder="请输入版权信息" value="{{ d.site_copy || '' }}" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">浏览器图标</label>
                            <div class="layui-input-inline">
                                <img id="srcimgurl" style="height:auto;max-height:32px;min-width:32px;margin: auto 10px;" src="{{ d.browser_icon_url || '' }}" />
                                <input type="hidden" name="browser_icon" id="inputimgguid" value="{{ d.browser_icon || '' }}" class="layui-input">
                                <a class="layui-btn layui-btn-sm uploadimgbtn" id="editimg"><i class="fa fa-upload"></i>上传图片</a>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">网站备案</label>
                            <div class="layui-input-inline">
                                <input name="miitbeian" title="请输入网站备案号" placeholder="请输入网站备案号" value="{{ d.miitbeian || '' }}" class="layui-input">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="layui-form-item">
                            <label class="layui-form-label labelnobb"></label>
                            <div class="layui-input-inline">
                                <button class="layui-btn" lay-submit lay-filter="kaige_form_btn_save"><i class="fa fa-save"></i> 保存配置</button>
                            </div>
                        </div>
                    </form>
                </div>
              
                <div class="layui-tab-item">
                    <form class="layui-form layui-form-pane">
                        <blockquote class="layui-elem-quote">
                            腾讯地图 <a target="_blank" href="https://lbs.qq.com/dev/console/application/mine">【进入腾讯控制台】</a>创建应用,勾选【WebServiceAPI】选择【授权IP】
                        </blockquote>
                        <div class="layui-form-item">
                            <label class="layui-form-label">腾讯地图-key名</label>
                            <div class="layui-input-inline" style="width: 120px;">
                                <input type="text" name="qq_map_name" value="{{ d.qq_map_name || '' }}" autocomplete="off" class="layui-input">
                            </div>
                            <label class="layui-form-label">腾讯地图-key</label>
                            <div class="layui-input-inline" style="width: 400px;">
                                <input type="text" name="qq_map_key" value="{{ d.qq_map_key || '' }}" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">网站统计</label>
                            <div class="layui-input-inline" style="width:600px;">
                                <input type="text" name="site_count_code" value="{{ d.site_count_code || '' }}" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid">
                                第三方网站统计代码
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="layui-form-item">
                            <label class="layui-form-label labelnobb"></label>
                            <div class="layui-input-inline">
                                <button class="layui-btn" lay-submit lay-filter="kaige_form_btn_save"><i class="fa fa-save"></i> 保存配置 </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </script>
</body>

</html>